import { Public } from "src/decorators/is-public.decorator";
import { SchedulerService } from "./scheduler.service";

import { Controller, Get } from "@nestjs/common";

@Controller('/schedule')
export class ScheduleController {
    constructor(private readonly schedulerService: SchedulerService) { }

    @Public()
    @Get('/cron-jobs')
    getCornJobs(): string[] {
        return this.schedulerService.getCornJobsInfo();
    }

    @Public()
    @Get('/timeout-jobs')
    getTimeoutJobs(): string[] {
        return this.schedulerService.getTimeoutJobsInfo();
    }


    @Public()
    @Get('/interval-jobs')
    getIntervalJobs(): string[] {
        return this.schedulerService.getIntervalJobsInfo();
    }
}